<template>
  <view class="list-content">
    <view
      class="list-content-item"
      v-for="(item, index) in datalist"
      :key="index"
      @click="selectfun(item)"
    >
      <view class="list-content-item-left">
        <image :src="item.product && item.product.image" mode="aspectFill" />
      </view>
      <view class="list-content-item-right">
        <view class="list-content-item-right-title">
          <text>{{ item.product && item.product.store_name }}</text>
        </view>
        <view class="list-content-item-right-dec"
          ><text>购买此套餐后可升级VIP</text>
        </view>
        <view class="list-content-item-right-num">
          <text class="list-content-item-right-yuan">¥</text>
          <text class="list-content-item-right-moery">{{
            item.product && item.product.price
          }}</text>
        </view>
      </view>
    </view>
  </view>
</template>
<script setup>
const props = defineProps({
  datalist: {
    type: Object,
  },
});
const emit = defineEmits(["selectEvent"]);

const selectfun = (obj) => {
  emit("selectEvent", obj);
};
</script>

<style scoped lang="scss">
@import "index.scss";
</style>
